module fairygui {
    export class EaseType {
        public static Linear: number = 0;
        public static SineIn: number = 1;
        public static SineOut: number = 2;
        public static SineInOut: number = 3;
        public static QuadIn: number = 4;
        public static QuadOut: number = 5;
        public static QuadInOut: number = 6;
        public static CubicIn: number = 7;
        public static CubicOut: number = 8;
        public static CubicInOut: number = 9;
        public static QuartIn: number = 10;
        public static QuartOut: number = 11;
        public static QuartInOut: number = 12;
        public static QuintIn: number = 13;
        public static QuintOut: number = 14;
        public static QuintInOut: number = 15;
        public static ExpoIn: number = 16;
        public static ExpoOut: number = 17;
        public static ExpoInOut: number = 18;
        public static CircIn: number = 19;
        public static CircOut: number = 20;
        public static CircInOut: number = 21;
        public static ElasticIn: number = 22;
        public static ElasticOut: number = 23;
        public static ElasticInOut: number = 24;
        public static BackIn: number = 25;
        public static BackOut: number = 26;
        public static BackInOut: number = 27;
        public static BounceIn: number = 28;
        public static BounceOut: number = 29;
        public static BounceInOut: number = 30;
        public static Custom: number = 31;

        private static easeTypeMap: Object = {
            "Linear": EaseType.Linear,
            "Elastic.In": EaseType.ElasticIn,
            "Elastic.Out": EaseType.ElasticInOut,
            "Elastic.InOut": EaseType.ElasticInOut,
            "Quad.In": EaseType.QuadIn,
            "Quad.Out": EaseType.QuadOut,
            "Quad.InOut": EaseType.QuadInOut,
            "Cube.In": EaseType.CubicIn,
            "Cube.Out": EaseType.CubicOut,
            "Cube.InOut": EaseType.CubicInOut,
            "Quart.In": EaseType.QuartIn,
            "Quart.Out": EaseType.QuartOut,
            "Quart.InOut": EaseType.QuartInOut,
            "Quint.In": EaseType.QuintIn,
            "Quint.Out": EaseType.QuintOut,
            "Quint.InOut": EaseType.QuintInOut,
            "Sine.In": EaseType.SineIn,
            "Sine.Out": EaseType.SineOut,
            "Sine.InOut": EaseType.SineInOut,
            "Bounce.In": EaseType.BounceIn,
            "Bounce.Out": EaseType.BounceOut,
            "Bounce.InOut": EaseType.BounceInOut,
            "Circ.In": EaseType.CircIn,
            "Circ.Out": EaseType.CircOut,
            "Circ.InOut": EaseType.CircInOut,
            "Expo.In": EaseType.ExpoIn,
            "Expo.Out": EaseType.ExpoOut,
            "Expo.InOut": EaseType.ExpoInOut,
            "Back.In": EaseType.BackIn,
            "Back.Out": EaseType.BackOut,
            "Back.InOut": EaseType.BackInOut
        };

        public static parseEaseType(value: string): number {
            var type: any = EaseType.easeTypeMap[value];
            if (type == undefined)
                return EaseType.ExpoOut;
            else
                return type;
        }
    }
}